package util;

import java.util.ArrayList;
import java.util.List;

import pojo.Merchant;
import pojo.MerchantApplication;

public class PackAsMerchantUtil {

	public static List<Merchant> pack(List<MerchantApplication> mList){
		List<Merchant> merchants = new ArrayList<>();
		if(mList.size()>0){
			for(MerchantApplication m:mList){
				Merchant merchant=new Merchant(null, m.getName(), m.getIdCard(), m.getAvatar(), 
						m.getAddress(), m.getStatus());
				merchants.add(merchant);
			}
		}
		return merchants;
	}
}
